﻿
@{
    ViewBag.Title = "ChargeBrxzDialog";  
    Layout = "~/Views/Shared/_Index.cshtml";
}

<div class="gridPanel" > 
    <table id="brxzGridList"></table> 
</div>

<style>
    .ui-jqgrid {border:0px;}
</style>
 
<script>   
    var brxzdata =localStorage.getItem("brxzData");
    var brxzdataJson = JSON.parse(brxzdata); 
    $(function () {
        gridList(brxzdataJson);
        localStorage.removeItem("brxzData");
    });

    function gridList(tempList) {
        var $gridList = $("#brxzGridList");
        $gridList.dataNewGrid({
            height: 100, 
            colModel: [
                { label: 'brxz', name: 'brxz', width: 10, hidden: true },
                { label: '病人性质', name: 'brxzmc', width: 100},
                { label: 'brxzbh', name: 'brxzbh', width: 10, hidden: true },
                { label: 'ybjylx', name: 'ybjylx', width: 10, hidden: true }
            ],
        }, tempList);

        if (tempList.length > 0) {
            $('.ui-jqgrid-bdiv').find(".unwritten").remove();
        }
    }

    //jqGrid 双击选中某行
    function btn_edit() {
        PatSearchConfirm();
    }

    function PatDbGrid() {
        var $gridList = $("#brxzGridList");
        var brxz = $gridList.jqGridRowValue().brxz;
        var brxzmc = $gridList.jqGridRowValue().brxzmc;
        var brxzbh = $gridList.jqGridRowValue().brxzbh;
        var obj = new Object();
        obj.brxz = brxz;
        obj.brxzmc = brxzmc;
        obj.brxzbh = brxzbh;
        $.currentWindow().getChargeInfoAjax(obj);
        //关闭窗口
        ReceiptCancle();
    }

    //确定 主页面调用
    function PatSearchConfirm() {
        PatDbGrid();
    }

    //取消
    function ReceiptCancle() {
        $.modalClose();
    }
</script>